<template>
    <form method="post" action="http://localhost:8080/api/borrow/import" enctype="multipart/form-data">
        <div>
            <el-label for="file">选择文件：</el-label>
            <input type="file" id="file" name="file" required>
        </div>
        <button type="submit" @click.prevent="showSuccessMessage">上传文件</button>
    </form>
</template>

<script>
export default {
    name: "uploadFile",
    methods: {
        showSuccessMessage() {
            this.$message({
                type: 'success',
                message: '上传成功'
            });
        }
    }
}</script>
